﻿using SqlSugar;

namespace Warehouse.Entites
{
    //仓库
    public class WareHouse : Audit
    {
        //仓库名称
        public string WHName { get; set; }

        //库位编号
        public string WHNumber { get; set; }

        //托盘号
        [SugarColumn(IsNullable = true)]
        public string PalletNumber { get; set; }

        // 目标（库位）排
        public int TargetPlatoon { get; set; } = 0;

        // 目标（库位）列
        public int TargetColumn { get; set; } = 0;

        /// <summary>
        /// 目标（库位）层
        /// </summary>
        public int TargetLayer { get; set; } = 0;

        /// <summary>
        /// 实际容量
        /// </summary>
        public int Capacity { get; set; } = 1;

        /// <summary>
        /// 当前数目
        /// </summary>
        public int CurrentQuantity { get; set; }

        /// <summary>
        /// 是否满了
        /// </summary>
        public bool IsFull => CurrentQuantity == Capacity;

        /// <summary>
        /// 库位状态(默认未使用)
        /// </summary>
        public bool WHStare { get; set; } = false;

        /// <summary>
        /// 储位(对应旷世的库位编号)
        /// </summary>
        public string CrownPrincce { get; set; }

        /// <summary>
        /// 区域
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Area { get; set; }

        [SugarColumn(IsNullable = true)]
        public string Remark { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enable { get; set; } = false;

        /// <summary>
        /// 物料编号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MaterialNamber { get; set; } = string.Empty;

        /// <summary>
        /// 物料名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MaterialName { get; set; } = string.Empty;

    }
}
